package cn.edu.ujn.lab3.mapper;

import cn.edu.ujn.lab3.entity.Customer;
import cn.edu.ujn.lab3.entity.Page;
import cn.edu.ujn.lab3.entity.user;
import cn.edu.ujn.lab3.entity.userDTO;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface userMapper {


    user findUserBycode(@Param("code") String code);
    userDTO selectByCode(@Param("code") String code);

    Boolean addUser(@Param("user") user user);

    Boolean updateUser(@Param("user")userDTO user);

    Boolean deleteUser(@Param("id")Integer id);

    List<userDTO> selectUserByPage(Page page);

    user checkUser(@Param("code")String code,@Param("password")String password);

    List<user> selectByName(@Param("name")String name);

    List<user> selectAll();
    user selectCustomerByUserId(@Param("customer") Customer customer);
    user selectCustomerByCreateId(@Param("customer") Customer customer);
}
